package com.sys.group.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sys.group.entity.Edge;
import com.sys.group.entity.Node;
import com.sys.group.mapper.EdgeMapper;
import com.sys.group.service.IEdgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author gyf
 * @since 2023-05-15
 */
@Service
public class EdgeServiceImpl extends ServiceImpl<EdgeMapper, Edge> implements IEdgeService {
    @Autowired
    private RedisTemplate redisTemplate;

    @Override
    public void addedge(Edge edge) {
        this.baseMapper.addedge(edge);
    }

    public List<Edge> getEdgesByParent(Integer parent, Integer tid){
        return this.baseMapper.getEdgesByParent(parent,tid);
    };
}
